package com.zshan.clinic.admin.mapper.stat;


import com.zshan.clinic.admin.entity.vo.StatClinicIncomeDailyVo;
import com.zshan.clinic.admin.entity.vo.StatClinicRegVo;
import com.zshan.clinic.database.model.*;
import com.zshan.clinic.mybatis.SuperMapper;
import org.apache.ibatis.annotations.Param;

import java.time.LocalDate;
import java.util.List;

public interface SpecStatMapper extends SuperMapper {

    /**
     * 诊所当日挂号统计
     * @param clinicId
     * @param visitDate
     * @return
     */
    StatClinicRegVo getRegStat(@Param("clinicId") Long clinicId,
                               @Param("visitDate") LocalDate visitDate,
                               @Param("doctorId") Long doctorId);

    /**
     * 诊所收益统计
     * @param clinicId
     * @param startDate
     * @param endDate
     * @return
     */
    StatClinicIncomeDailyVo getClinicIncome(@Param("clinicId") Long clinicId,
                                            @Param("startDate") LocalDate startDate,
                                            @Param("endDate") LocalDate endDate);

    /**
     * 批量添加挂号统计
     * @param statClinicRegDailyList
     */
    void addStatClinicRegDailyBatch(@Param("list") List<StatClinicRegDaily> statClinicRegDailyList);

    /**
     * 批量添加收费统计
     * @param statClinicChargeDailyList
     */
    void addStatClinicChargeDailyBatch(@Param("list") List<StatClinicChargeDaily> statClinicChargeDailyList);

    /**
     * 批量添加门诊统计
     * @param statClinicMedicalDailyList
     */
    void addStatClinicMedicalDailyBatch(@Param("list") List<StatClinicMedicalDaily> statClinicMedicalDailyList);

    /**
     * 批量添加查验统计
     * @param statClinicExamDailyList
     */
    void addStatClinicExamDailyBatch(@Param("list") List<StatClinicExamDaily> statClinicExamDailyList);

    /**
     * 批量添加药房统计
     * @param statClinicDispenseDailyList
     */
    void addStatClinicDispenseDailyBatch(@Param("list") List<StatClinicDispenseDaily> statClinicDispenseDailyList);

    /**
     * 诊所挂号统计
     * @param statDate
     * @return
     */
    List<StatClinicRegDaily> getStatClinicRegDailyList(@Param("statDate") LocalDate statDate);

    /**
     * 收费统计
     * @param statDate
     * @return
     */
    List<StatClinicChargeDaily> getStatClinicChargeDailyList(@Param("statDate") LocalDate statDate);

    /**
     * 门诊统计
     * @param statDate
     * @return
     */
    List<StatClinicMedicalDaily> getStatClinicMedicalDailyList(@Param("statDate") LocalDate statDate);

    /**
     * 查验统计
     * @param statDate
     * @return
     */
    List<StatClinicExamDaily> getStatClinicExamDailyList(@Param("statDate") LocalDate statDate);

    /**
     * 外治统计
     * @param statDate
     * @return
     */
    List<StatClinicExamDaily> getStatClinicExtDailyList(@Param("statDate") LocalDate statDate);

    /**
     * 药房统计
     * @param statDate
     * @return
     */
    List<StatClinicDispenseDaily> getStatClinicDispenseDailyList(@Param("statDate") LocalDate statDate);
}
